import javax.swing.*;
import java.awt.event.*;
import java.awt.*;

public class myGui implements ActionListener
{
	JButton button;
	JFrame frame;
	public static void main(String[] args)
	{
		myGui mg = new myGui();
		mg.los();
	}
	
	public void los()
	{
		frame = new JFrame();
		frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
		button = new JButton("Klick es");

		button.addActionListener(this);
		
		frame.add(BorderLayout.NORTH,button);
		frame.setSize(300,300);
		frame.setVisible(true);
	}
	
	public void actionPerformed(ActionEvent event)
	{
		// button.setText("Klick e");
		MeinPanel mp = new MeinPanel();
		frame.add(mp);
		frame.repaint();
		frame.setVisible(true);
		// frame.repaint();
		
	}
}